How to use string charAt () in Java